Technology for virtually executing music performance based on movement of an input device including an acceleration sensor has been known to date. In this technology, movement (shaking) of the input device is detected by using an acceleration sensor, and moving (shaking) the input device once in a predetermined direction is handled as an action for one stroke in the case of a guitar, and as an operation for one hit (operation for one beating) in the case of a percussion instrument, thereby executing virtual performance of a musical instrument.
In the technology as described above, when the input device is moved in a predetermined direction, music performance for one stroke is executed in the case of a guitar, and music performance for one hit is executed in the case of a percussion instrument. Namely, detection of movement of the input device in the predetermined direction is used for determining a time at which the music performance (operation) for one stroke of a guitar is started, or a time at which the music performance (operation) for hitting a percussion instrument once is started. This is not substantially different from a manner in which a time at which the above-described operation is started is determined based on detection of an input using a button, and minute music performance operation based on variable movement cannot be executed.
Therefore, a feature of the exemplary embodiments is to make available a computer-readable storage medium having stored therein an information processing program capable of executing an operation with enhanced minuteness, by an operation of moving an input device itself.
The illustrative embodiments may have the following features.
A computer-readable storage medium having stored therein an information processing program according to the exemplary embodiment is a computer-readable storage medium having stored therein an information processing program executed by a computer of an information processing apparatus that performs processing based on an input from an input device including an acceleration sensor and an angular velocity sensor. The information processing program causes the computer to function as: a combined speed settings section and a processor. The combined speed setting section is configured to set a combined speed indicating a speed based on a movement of the input device, by using acceleration data outputted by the acceleration sensor, and angular velocity data outputted by the angular velocity sensor. The processor is configured to execute a predetermined process based on the combined speed having been set by the combined speed setting section.
In the features described above, a predetermined process is executed according to a movement of the input device moved by a player, thereby enabling an operation to be performed with enhanced minuteness.
According to another feature of the exemplary embodiment, the combined speed setting section may change a rate of the acceleration data to be used in the combined speed, according to a magnitude of an angular velocity represented by the angular velocity data, to set the combined speed.
In the features described above, even in a case where the input device is moved at a low angular velocity, an acceleration is used in a complementary manner, so that the combined speed can be set according to a movement of the input device.
According to still another feature of the exemplary embodiment, the combined speed setting section may set the combined speed such that the less a value of the angular velocity data is, the greater a rate of the acceleration data to be used in the combined speed is.
In the features described above, even when a manner, such as a parallel shifting manner, in which the input device is moved at a low angular velocity, is used, the combined speed can be set according to a movement of the input device.
According to still another feature of the exemplary embodiment, the information processing program causes the computer to further function as a music data storing section configured to store music data to be reproduced, and the processor may include a reproduction controller configured to reproduce the music data based on the combined speed having been set by the combined speed setting section.
In the features described above, a reproduction speed of a music can be changed according to a movement of the input device moved by a player. Therefore, in information processing for, for example, causing a player to perform an operation for playing the stringed instrument, the player is allowed to perform a music performance operation with a favorable minuteness.
According to still another feature of the exemplary embodiment, the information processing program causes the computer to further function as a reproduction start position setting section configured to set a reproduction start position of the music data, based on the acceleration data and the angular velocity, data, and the reproduction controller may start to reproduce the music data from the reproduction start position having been set.
In the features described above, the reproduction start position of the music data can be determined according to a movement of the input device, thereby enabling a music performance operation to be performed with a favorable minuteness.
According to still another feature of the exemplary embodiment, the reproduction start position setting section may set, as the reproduction start position, one of a start end of the music data and a finish end of the music data.
In the features described above, in a case where, for example, a music performance operation for playing the musical instrument such as the harp is performed, the music performance can be started from any one of the ends of the harp.
According to still another feature of the exemplary embodiment, the reproduction start position setting section may set the reproduction start position based on the combined speed.
In the features described above, the reproduction start position of the music data can be determined according to a movement of the input device, thereby enabling a music performance operation to be performed with a favorable minuteness.
According to still another feature of the exemplary embodiment, the information processing program causes the computer to further function as a reproduction direction setting section configured to set a reproduction direction of the music data, based on the acceleration data and the angular velocity data, and the reproduction controller may reproduce the music data in the reproduction direction having been set by the reproduction direction setting section.
In the features described above, the reproduction direction (forward direction or reverse direction) for the music data can be changed according to a movement of the input device, thereby enabling a music performance operation to be performed with a favorable minuteness.
According to still another feature of the exemplary embodiment, the reproduction controller may include a reproduction speed setting section configured to set a reproduction speed at which the music data is reproduced, based on the combined speed.
In the features described above, the reproduction speed can be changed according to a speed at which the input device is moved, so that, when a user performs an operation for playing the musical instrument, the operation can be performed with a favorable minuteness.
According to still another feature of the exemplary embodiment, the combined speed setting section may repeatedly set the combined speed, and the reproduction speed setting section may repeatedly set the reproduction speed, based on the combined speed that is repeatedly set.
In the features described above, also while the music data is being reproduced, the reproduction speed can be changed according to a speed at which the input device is moved.
According to still another feature of the exemplary embodiment, the reproduction speed setting section may set the reproduction speed only when the reproduction speed that is set based on the combined speed is increased.
In the features described above, a player can be prevented from uncomfortably performing a music performance operation due to a music being heard in a state where sound reproduction interval varies, thereby allowing the player to enjoy the music performance operation in a comfortable manner.
According to still another feature of the exemplary embodiment, the information processing program causes the computer to further function as a reproduction stop determination section configured to determine whether or not reproduction of the music data being reproduced is to be stopped, based on the acceleration data and the angular velocity data, and the reproduction controller may determine, when the reproduction stop determination section determines that the reproduction of the music data is to be stopped, a reproduction stop position on the music data, based on the acceleration data and the angular velocity data, and stop the reproduction at the reproduction stop position having been determined.
In the features described above, in a case where, for example, an operation of playing the harp is performed, when the input device is vigorously shaken by a player, a series of sounds in a scale can be produced according to an inertia of the shaking operation, thereby allowing the player to enjoy the music performance operation in a comfortable manner.
According to still another feature of the exemplary embodiment, the information processing program causes the computer to further function as a reproduction condition determination section configured to determine whether or not a predetermined condition for reproducing a music is satisfied, and the reproduction controller may reproduce the music data while the reproduction condition determination section determines that the predetermined condition is satisfied.
In the features described above, in a case where, for example, the input device is moved at a low speed, production of a sound which is not needed can be prevented.
According to still another feature of the exemplary embodiment, the input device may further include a predetermined input section, the reproduction condition determination section may determine whether or not the input is performed on the predetermined input section, and the reproduction controller may reproduce the music data while the reproduction condition determination section determines that the input is performed on the predetermined input section.
In the features described above, for example, a sound is reproduced only when a predetermined button is pressed, thereby preventing production of a sound which is not needed.
According to still another feature of the exemplary embodiment, the music data may be data representing a musical score in which predetermined sounds are provided at regular intervals.
In the features described above, for example, a player is allowed to perform an operation for emulating a music performance of playing the stringed instrument such as the harp and the guitar (the strings are provided at regular intervals).
According to the exemplary embodiment, in information processing in which, for example, a player is allowed to perform an operation of playing the stringed instrument, the player is allowed to perform an operation with a favorable minuteness.
These and other objects, features, aspects, and advantages of exemplary embodiments will become more apparent from the following detailed description of the exemplary embodiments when taken in conjunction with the accompanying drawings.